<?php 
include '../vendor/autoload.php';
include '../src/PHPExcelHelper.php';

$ToolExcel = new \whalephp\tool\PHPExcelHelper();
$fileInfo = array(
		'file_name'	=> '测试-多Sheet',
        'width' => 25,
        'sheet' => [
            ['sheetIndex' => 0, 'sheetTitle' => '订单汇总'],
            ['sheetIndex' => 1, 'sheetTitle' => '订单商品'],
        ],
		'sheetInfo'	=> array(
				'sheetIndex'	=> 0,
				'sheetTitle'	=> '订单汇总',
		),
);
$excel_config = array(
    array(
        'id'	=> '编号',
        'name'	=> '姓名',
    ),
    array(
        'id'	=> '编号2',
        'name'	=> '姓名2',
    )
);
$list = array(
    array(
        array('id'=>1,'name'=>'a'),
        array('id'=>2,'name'=>'b'),
        array('id'=>3,'name'=>'c'),
        array('id'=>4,'name'=>'c'),
    ),
    array(
        array('id'=>1,'name'=>'a2'),
        array('id'=>2,'name'=>'b2'),
        array('id'=>3,'name'=>'c2'),
        array('id'=>4,'name'=>'c2'),
    ),
);

$ToolExcel->exportExcelSimp($fileInfo,$excel_config,$list);

